package eirkdbd.lab1.gui;

import java.awt.BorderLayout;
import java.awt.Color;

import javax.swing.JFrame;

public class MainFrame extends JFrame {

	/**
	 * 
	 */
	private static final long serialVersionUID = 9000L;

	private static final String TITLE = "Kwerendy bipolarne";

	private MainFrame() {
		super(TITLE);
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

		init();

		setLocation(10, 10);
		pack();
		setVisible(true);
	}

	private void init() {
		setLayout(new BorderLayout());
		setBackground(Color.darkGray);
		initTitlePane();
		initTabbedPane();
		initNorthPane();
		initSouthPane();
		initMenuBar();
	}

	private void initMenuBar() {
		// TODO
		// setJMenuBar(new MainMenuBar());
	}

	private void initTitlePane() {
		add(new TitlePane(), BorderLayout.EAST);
	}

	private void initNorthPane() {
		add(new NorthPane(), BorderLayout.NORTH);
	}
	private void initSouthPane() {
		add(new  SouthPane(), BorderLayout.SOUTH);
	}
	
	private void initTabbedPane() {
		add(new TabbedPane(), BorderLayout.CENTER);
	}

	public static void main(String[] str) {
		new MainFrame();
	}
}